﻿using System;
using System.Collections.Generic;

namespace Moonlite.Composition
{
    public class ExtensionCollection : List<Extension>
    {
        public Extension GetExtensionFromPath(string path)
        {
            foreach (Extension extension in this)
            {
                if (extension.Path == path)
                {
                    return extension;
                }
            }

            return null;
        }

        public ExtensionCollection()
        {

        }

        public ExtensionCollection(int capacity)
            : base(capacity)
        {

        }

        public ExtensionCollection(IEnumerable<Extension> collection)
            : base(collection)
        {

        }
    }
}
